package com.weetop.akly.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import java.util.ArrayList;

public class FragmentPagerAdapter extends android.support.v4.app.FragmentPagerAdapter {
    private ArrayList<Fragment> mFragments2;

    public FragmentPagerAdapter(FragmentManager fm, ArrayList<Fragment> mFragments) {
        super(fm);
        this.mFragments2=mFragments;
    }

    @Override
    public int getCount() {
        return mFragments2.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return position+"";
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments2.get(position);
    }
}
